<h1>Editing post</h1>

<%= error_messages_for :post %>

<% form_for(:post, :url => post_path(@post), :html => { :method => :put }) do |f| %>
  <p>
    <b>Title</b><br />
    <%= f.text_field :title %>
  </p>

  <p>
    <b>Body</b><br />
    <%= f.text_area :body %>
  </p>

  <p>
    <%= submit_tag "Update" %>
  </p>
<% end %>

<%= link_to 'Show', post_path(@post) %> |
<%= link_to 'Back', posts_path %>